package com.kingsailor.gunsmith;

import edu.jetwinner.spring.SpringBootAppContextHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author xulixin
 */
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
public class FastBootApplication {

    protected final static Logger logger = LoggerFactory.getLogger(FastBootApplication.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(FastBootApplication.class, args);
        SpringBootAppContextHandler.me().setSpringBootAppPrimaryClass(FastBootApplication.class)
                .setArgs(args).setApplicationContext(ctx);
        logger.info("Gunsmith SpringBoot Fast Application is success!");
    }

}
